/*
 * @Author: guoyangf
 * @Date: 2020-05-28 16:39:24
 * @LastEditTime: 2020-08-04 15:19:01
 * @Description: file content
 */

export default function tabBarEvent(activeKey) {

    //切换tab对应的查询区
    let searchConfigArr = this.state.searchConfigArr;
    searchConfigArr.forEach((one) => {
        one.isShow = one.tabCode == activeKey;
    })

    //切换tab对应的列表区
    let listConfigArr = this.state.listConfigArr;
    listConfigArr.forEach((one) => {
        one.isShow = one.tabCode == activeKey;
        if (one.isShow ) {
            this.targetListConfig = one;  //将当前页签的列表配置信息保存在this中，便于其他地方调用
        }
    })

    this.setState({
        searchConfigArr,
        listConfigArr,
        activeTabKey: activeKey
    })

    

    this.queryParam.tabcode = activeKey
}